package com.dehui.traders.ui.login;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.dehui.traders.BR;

import com.dehui.traders.R;
import com.dehui.traders.databinding.ActivityLoginBinding;
import com.dehui.traders.ui.base.AppActvity;

/**
 * Created by hqq on 18.4.4.
 */

public class LoginActivity extends AppActvity<ActivityLoginBinding,LoginViewModel> {

    private LoginViewModel viewModel;

    @Override
    public int initContentView() {
        return R.layout.activity_login;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }

    @Override
    public LoginViewModel initViewModel() {
        viewModel = new LoginViewModel(this);
        viewModel.setThis(this);
        return viewModel;
    }


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initToolbarValue(R.string.login);
    }

    public static void start(Context context){
        Intent intent = new Intent(context,LoginActivity.class);
        context.startActivity(intent);
    }

}
